<?php
/**
 * oppo rom 发布系统
 *
 * @author qianyunlai.com
 */

define('APPTYPEID', 99);
define('CURSCRIPT', 'oppo');


require './source/class/class_core.php';

$discuz = C::app();

/*
$cachelist = array('grouptype', 'groupindex', 'diytemplatenamegroup');
$discuz->cachelist = $cachelist;
*/
$discuz->init();

$_G['disabledwidthauto'] = 0;

$modarray = array(
		'index',
		'product',
		'permission',
		'publish',
		'admin',
		'api',
);
$mod = !in_array($_G['mod'], $modarray) ? 'index' : $_G['mod'];

define('CURMODULE', $mod);

runhooks();

// 转义一下吧
daddslashes($_GET);
daddslashes($_POST);

// 检测是否已登录
if (in_array($mod, array('permission', 'publish', 'admin'))) {
	if (!$_G['uid']) {
		showmessage('not_loggedin', NULL, array(), array('login' => 1));
	}

	//
}

// tab样式控制
$leftNav = array(
			'product' => '',
			'permission' => '',
			'publish' => '',
			'admin' => '',
			'api' => '',
		);
$leftNav[$mod] = 'class="a"';

// 发布级别
$publishLevel = array(
			'1' => '不可见',
			'2' => '正式版',
			'3' => '开发版',
			'4' => '内测版'
		);

require DISCUZ_ROOT . './source/function/function_oppo.php';
require DISCUZ_ROOT.'./source/module/oppo/oppo_'.$mod.'.php';
?>